
import React, { useState } from 'react';
import { Row, Col, Card, Switch, Statistic, Tooltip, Space, Tabs } from 'antd'
import { history, connect } from 'umi';
import { ExclamationCircleOutlined, } from '@ant-design/icons'
import CustomerList from './components/customerList';
import BindRule from './components/bindRule';
import ShareUserList from './components/shareUserList';
const Customer = (props) => {
    const { } = props
    const [activeTabKey, setActiveTabKey] = useState('customerList');
    const tabList = [
        {
            label: `关联客户列表`,
            key: 'customerList',

        },
        {

            label: `绑定规则`,
            key: 'bindRule',
        },
        {

            label: `邀请客户列表`,
            key: 'shareUserList',
        },
       
    ];
    const renderContent = {
        customerList: <CustomerList></CustomerList>,
        bindRule: <BindRule></BindRule>,
        shareUserList:<ShareUserList></ShareUserList>
    }[activeTabKey]
    const onTabChange = (key) => {
        setActiveTabKey(key);
    };
    return <Card style={{
        width: '100%',
        minHeight: 900
    }}>
        <Tabs
            onChange={onTabChange}
            activeKey={activeTabKey}
            items={tabList}

            type="card"
        >
        </Tabs>
        {renderContent}
    </Card>


}

export default connect(({ loading }) => ({

    loading: loading.models.institution,
}))(Customer);
